﻿<%@ Page Language="C#" MasterPageFile="~/WebAdminWithConfirmation.master" AutoEventWireup="true"
    CodeBehind="manageAllRoles.aspx.cs" Inherits="Salient.Web.Administration.Security.Roles.manageAllRoles" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="buttons">
    <asp:Button ValidationGroup="none" Text="<%$ Resources:Back%>" ID="doneButton" OnClick="ReturnToPreviousPage"
        runat="server" />
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="titleBar">
    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:ManageRoles %>" />
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="content">
    <div style="width: 580">
        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Instructions %>" />
    </div>
    <br />
    <table cellspacing="0" cellpadding="5" class="lrbBorders" width="580">
        <tr>
            <td class="callOutStyle">
                <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:CreateNewRole %>" />
            </td>
        </tr>
        <tr>
            <td class="bodyTextNoPadding">
                <asp:Label ID="Label1" runat="server" AssociatedControlID="textBox1" Text="<%$ Resources:NewRoleName %>" />
                <asp:TextBox runat="server" ID="textBox1" MaxLength="256" />
                <asp:Button runat="server" ID="Button01" Text="<%$ Resources:AddRole %>" OnClick="AddRole" /><br />
                <asp:Label runat="server" ID="errorMessage" EnableViewState="false" ForeColor="Red"
                    Visible="false" />
            </td>
        </tr>
    </table>
    <%-- Cause the textbox to submit the page on enter, raising server side onclick--%>
    <input type="text" style="visibility: hidden" />
    <br />
    <table cellspacing="0" cellpadding="0" border="0" width="580">
        <tbody>
            <tr valign="top">
                <td height="100%" class="lrbBorders">
                    <asp:GridView runat="server" ID="dataGrid" AllowPaging="true" AutoGenerateColumns="False"
                        border="0" CellPadding="5" CellSpacing="0" OnPageIndexChanging="IndexChanged"
                        PageSize="7" Width="100%" UseAccessibleHeader="true">
                        <RowStyle CssClass="gridRowStyle" />
                        <AlternatingRowStyle CssClass="gridAlternatingRowStyle" />
                        <FooterStyle ForeColor="#003399" BackColor="#99CCCC" />
                        <HeaderStyle CssClass="callOutStyle" Font-Bold="true" />
                        <SelectedRowStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999" />
                        <PagerStyle ForeColor="#000000" BackColor="#EEEEEE" />
                        <PagerSettings Mode="Numeric" />
                        <Columns>
                            <asp:TemplateField runat="server" HeaderText="<%$ Resources:RoleName %>">
                                <ItemTemplate>
                                    <%# Container.DataItem %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField runat="server" HeaderText="<%$ Resources:AddRemove %>">
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="linkButton01" Text="<%$ Resources:Manage %>" CommandName="ManageRole"
                                        ToolTip='<%# GetToolTip("Manage",Container.DataItem.ToString()) %>' CommandArgument='<%#Container.DataItem%>'
                                        OnCommand='LinkButtonClick' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField runat="server">
                                <ItemStyle HorizontalAlign="center" />
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="linkButton02" Text="<%$ Resources:Delete %>" CommandName="DeleteRole"
                                        ToolTip='<%# GetToolTip("Delete",Container.DataItem.ToString()) %>' CommandArgument='<%#Container.DataItem%>'
                                        OnCommand='LinkButtonClick' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </tbody>
    </table>
</asp:Content>
<%-- Confirmation Dialog --%>
<asp:Content ID="Content4" runat="server" ContentPlaceHolderID="dialogTitle">
    <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:UserManagement %>" />
</asp:Content>
<asp:Content ID="Content5" runat="server" ContentPlaceHolderID="dialogContent">
    <img src="../../Images/alert_lrg.gif" />
    <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:AreYouSure %>" />
    "<asp:Label runat="server" ID="RoleName" Font-Bold="true" />"?
</asp:Content>
<asp:Content ID="Content6" runat="server" ContentPlaceHolderID="dialogBottomLeftButton">
    <asp:Button ID="Button04" runat="server" OnClick="Yes_Click" Text="<%$ Resources:Yes %>"
        Width="100" />
</asp:Content>
<asp:Content ID="Content7" runat="server" ContentPlaceHolderID="dialogBottomRightButton">
    <asp:Button ID="Button05" runat="server" OnClick="No_Click" Text="<%$ Resources:No %>"
        Width="100" />
</asp:Content>
